import pymunk as pm
import loader

def init(space):
    space.add_collision_handler(loader.getType("Hero"), loader.getType("Box"), HeroColidedBox, None, None, None, None, None)

def HeroColidedBox(space, arbiter, args, kwargs):
    (b, a) = arbiter.shapes #for some reason the order of objects is reversed
    loader.RemoveObjects.append(b)
    return True
